<HTML>

<HEAD>
<!-- Generated by CppDoc v2.4.1 on June 07, 2008 at 22:48-->

	<META NAME="GENERATOR" Content="CppDoc">
	<TITLE>Nestopia Core API: Nes::Api::Cheats</TITLE>

</HEAD>

<BODY>
<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#eeeeff">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="../../index-overview-summary.html"><B>Overview</B></a>&nbsp;</TD>
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="project-summary.html"><B>Project</B></a>&nbsp;</TD>
  <TD BGCOLOR="navy"> <FONT COLOR="white">&nbsp;<B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="project-tree.html"><B>Tree</B></a>&nbsp;</TD>
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="../../index-deprecated-list.html"><B>Deprecated</B></a>&nbsp;</TD>
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="../../index-all.html"><B>Index</B></a>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<B>Nestopia Core API</B></EM>
</TD>
</TR>

<TR>
<TD><FONT SIZE="-2">
  <a href="../../index.html" target="_top"><B>FRAMES</B></a>  &nbsp;
&nbsp;<a href="../api/Nes..Api..Cheats.html" target="_top"><B>NO FRAMES</B></a></FONT></TD>
</TR>
<TR>
<TD VALIGN="top"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>
<!-- ======== START OF CLASS DATA ======== -->
<H2>
<FONT SIZE="-1">
api</FONT>
<BR>
Class  Nes::Api::Cheats</H2>
<PRE>
<code>Base</code>
   |
   +--<B>Nes::Api::Cheats</B>

</PRE>
<HR>
<DL>
<DT>class <B><a href="../api/Nes..Api.html">Nes::Api</a>::Cheats</B></DT><dt> extends Base
</DL>

<p>Cheats interface.
<p>

<HR>


<!-- =========== INNER CLASSES, TYPEDEFS, ENUMS =========== -->

<A NAME="inner_defs_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#ccccff">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Inner Classes, Typedefs, and Enums</B></FONT></TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>struct</CODE></FONT></TD>
<TD><B><CODE><a href="../api/Nes..Api..Cheats..Code.html">Nes::Api::Cheats::Code</a></CODE></B>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Cheat code.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1">
<CODE>typedef</CODE></FONT></TD>
<TD><B><CODE><a href="../api/Nes..Api..Cheats..RAM_SIZE.html">Nes::Api::Cheats::RAM_SIZE</a></CODE></B>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CPU RAM pointer reference.</TD>
</TR>
</TABLE>
&nbsp;

<!-- =========== CONSTRUCTOR SUMMARY =========== -->

<A NAME="constructor_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#ccccff">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Constructor Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white">
<TD><CODE><B><a href="#Cheats(T&)">Cheats</a></B>( T& instance )</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Interface constructor.</TD>
</TR>
</TABLE>
&nbsp;

<!-- =========== METHOD SUMMARY =========== -->

<A NAME="method_summary"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#ccccff">
<TD COLSPAN=2><FONT SIZE="+2">
<B>Method Summary</B></FONT></TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;Result</CODE></FONT></TD>
<TD><CODE><B><a href="#ClearCodes()">ClearCodes</a></B>()</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes all existing codes.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;Result</CODE></FONT></TD>
<TD><CODE><B><a href="#DeleteCode(ulong)">DeleteCode</a></B>( ulong index )</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Removes an existing code.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;static Result NST_CALL</CODE></FONT></TD>
<TD><CODE><B><a href="#GameGenieDecode(constchar*,Code&)">GameGenieDecode</a></B>( const char* string, <a href="../api/Nes..Api..Cheats..Code.html">Nes::Api::Cheats::Code</a>& code )</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Decodes a Game Genie code.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;static Result NST_CALL</CODE></FONT></TD>
<TD><CODE><B><a href="#GameGenieEncode(constCode&,char(&[9])">GameGenieEncode</a></B>( const <a href="../api/Nes..Api..Cheats..Code.html">Nes::Api::Cheats::Code</a>& code, char(& string )[ 9] )</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Encodes into a Game Genie code.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;Result</CODE></FONT></TD>
<TD><CODE><B><a href="#GetCode(ulong,ushort*,uchar*,uchar*,bool*)">GetCode</a></B>( ulong index, ushort* address, uchar* value, uchar* compare, bool* useCompare ) const</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns attributes of an existing code.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;Result</CODE></FONT></TD>
<TD><CODE><B><a href="#GetCode(ulong,Code&)">GetCode</a></B>( ulong index, <a href="../api/Nes..Api..Cheats..Code.html">Nes::Api::Cheats::Code</a>& code ) const</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an existing code.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;Ram</CODE></FONT></TD>
<TD><CODE><B><a href="#GetRam()">GetRam</a></B>() const</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns read-only content of CPU RAM.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;ulong</CODE></FONT></TD>
<TD><CODE><B><a href="#NumCodes()">NumCodes</a></B>() const</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns current number of codes.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;static Result NST_CALL</CODE></FONT></TD>
<TD><CODE><B><a href="#ProActionRockyDecode(constchar*,Code&)">ProActionRockyDecode</a></B>( const char* string, <a href="../api/Nes..Api..Cheats..Code.html">Nes::Api::Cheats::Code</a>& code )</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Decodes a Pro-Action Rocky code.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;static Result NST_CALL</CODE></FONT></TD>
<TD><CODE><B><a href="#ProActionRockyEncode(constCode&,char(&[9])">ProActionRockyEncode</a></B>( const <a href="../api/Nes..Api..Cheats..Code.html">Nes::Api::Cheats::Code</a>& code, char(& string )[ 9] )</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Encodes into a Pro-Action Rocky code.</TD>
</TR>
<TR BGCOLOR="white">
<TD ALIGN="right" VALIGN="top" WIDTH="1%" NOWRAP><FONT SIZE="-1">
<CODE>&nbsp;Result</CODE></FONT></TD>
<TD><CODE><B><a href="#SetCode(constCode&)">SetCode</a></B>( const <a href="../api/Nes..Api..Cheats..Code.html">Nes::Api::Cheats::Code</a>& code )</CODE>

<BR>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Adds a new code.</TD>
</TR>
</TABLE>
&nbsp;

<BR>
<BR>
<!-- ============ Constructor Detail ========== -->

<A NAME="constructor_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#ccccff">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Constructor Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="Cheats(T&)"><!-- --></A>
<A NAME="Cheats"><!-- --></A>
<H3>Cheats</H3>
<PRE>
public <B>Cheats</B>( T& instance );
</PRE>
<DL>
<DD>Interface constructor.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>instance</code> - emulator instance</DD>
</DL>

</DL>
<HR>

<BR>
<!-- ============ Method Detail ========== -->

<A NAME="method_detail"><!-- --></A>
<TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%">
<TR BGCOLOR="#ccccff">
<TD COLSPAN=1><FONT SIZE="+2">
<B>Method Detail</B></FONT></TD>
</TR>
</TABLE>

<A NAME="ClearCodes()"><!-- --></A>
<A NAME="ClearCodes"><!-- --></A>
<H3>ClearCodes</H3>
<PRE>
public Result <B>ClearCodes</B>() throw();
</PRE>
<DL>
<DD>Removes all existing codes.
</DD>
<DL>
<DT><B>Returns: </B><DD>result code</DD>
</DL>

</DL>
<HR>

<A NAME="DeleteCode(ulong)"><!-- --></A>
<A NAME="DeleteCode"><!-- --></A>
<H3>DeleteCode</H3>
<PRE>
public Result <B>DeleteCode</B>( ulong index ) throw();
</PRE>
<DL>
<DD>Removes an existing code.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>index</code> - code index</DD>
<DT><B>Returns: </B><DD>result code</DD>
</DL>

</DL>
<HR>

<A NAME="GameGenieDecode(constchar*,Code&)"><!-- --></A>
<A NAME="GameGenieDecode"><!-- --></A>
<H3>GameGenieDecode</H3>
<PRE>
public static Result NST_CALL <B>GameGenieDecode</B>( const char* string, <a href="../api/Nes..Api..Cheats..Code.html">Nes::Api::Cheats::Code</a>& code ) throw();
</PRE>
<DL>
<DD>Decodes a Game Genie code.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>string</code> - Game Genie encoded string
<DD><code>code</code> - object to be filled</DD>
<DT><B>Returns: </B><DD>result code</DD>
</DL>

</DL>
<HR>

<A NAME="GameGenieEncode(constCode&,char(&[9])"><!-- --></A>
<A NAME="GameGenieEncode"><!-- --></A>
<H3>GameGenieEncode</H3>
<PRE>
public static Result NST_CALL <B>GameGenieEncode</B>( const <a href="../api/Nes..Api..Cheats..Code.html">Nes::Api::Cheats::Code</a>& code, char(& string )[ 9] ) throw();
</PRE>
<DL>
<DD>Encodes into a Game Genie code.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>code</code> - code to be encoded
<DD><code>string</code> - Game Genie code string to be filled</DD>
<DT><B>Returns: </B><DD>result code</DD>
</DL>

</DL>
<HR>

<A NAME="GetCode(ulong,ushort*,uchar*,uchar*,bool*)"><!-- --></A>
<A NAME="GetCode"><!-- --></A>
<H3>GetCode</H3>
<PRE>
public Result <B>GetCode</B>( ulong index, ushort* address, uchar* value, uchar* compare, bool* useCompare ) const throw();
</PRE>
<DL>
<DD>Returns attributes of an existing code.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>index</code> - code index
<DD><code>address</code> - address to be filled or NULL if not needed
<DD><code>value</code> - value to be filled or NULL if not needed
<DD><code>compare</code> - compare-value to be filled or NULL if not needed
<DD><code>useCompare</code> - compare-value enable to be filled or NULL if not needed</DD>
<DT><B>Returns: </B><DD>result code</DD>
</DL>

</DL>
<HR>

<A NAME="GetCode(ulong,Code&)"><!-- --></A>
<A NAME="GetCode"><!-- --></A>
<H3>GetCode</H3>
<PRE>
public Result <B>GetCode</B>( ulong index, <a href="../api/Nes..Api..Cheats..Code.html">Nes::Api::Cheats::Code</a>& code ) const throw();
</PRE>
<DL>
<DD>Returns an existing code.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>index</code> - code index
<DD><code>code</code> - object to be filled</DD>
<DT><B>Returns: </B><DD>result code</DD>
</DL>

</DL>
<HR>

<A NAME="GetRam()"><!-- --></A>
<A NAME="GetRam"><!-- --></A>
<H3>GetRam</H3>
<PRE>
public Ram <B>GetRam</B>() const throw();
</PRE>
<DL>
<DD>Returns read-only content of CPU RAM.
</DD>
<DL>
<DT><B>Returns: </B><DD>CPU RAM</DD>
</DL>

</DL>
<HR>

<A NAME="NumCodes()"><!-- --></A>
<A NAME="NumCodes"><!-- --></A>
<H3>NumCodes</H3>
<PRE>
public ulong <B>NumCodes</B>() const throw();
</PRE>
<DL>
<DD>Returns current number of codes.
</DD>
<DL>
<DT><B>Returns: </B><DD>number</DD>
</DL>

</DL>
<HR>

<A NAME="ProActionRockyDecode(constchar*,Code&)"><!-- --></A>
<A NAME="ProActionRockyDecode"><!-- --></A>
<H3>ProActionRockyDecode</H3>
<PRE>
public static Result NST_CALL <B>ProActionRockyDecode</B>( const char* string, <a href="../api/Nes..Api..Cheats..Code.html">Nes::Api::Cheats::Code</a>& code ) throw();
</PRE>
<DL>
<DD>Decodes a Pro-Action Rocky code.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>string</code> - Pro-Action Rocky encoded string
<DD><code>code</code> - object to be filled</DD>
<DT><B>Returns: </B><DD>result</DD>
</DL>

</DL>
<HR>

<A NAME="ProActionRockyEncode(constCode&,char(&[9])"><!-- --></A>
<A NAME="ProActionRockyEncode"><!-- --></A>
<H3>ProActionRockyEncode</H3>
<PRE>
public static Result NST_CALL <B>ProActionRockyEncode</B>( const <a href="../api/Nes..Api..Cheats..Code.html">Nes::Api::Cheats::Code</a>& code, char(& string )[ 9] ) throw();
</PRE>
<DL>
<DD>Encodes into a Pro-Action Rocky code.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>code</code> - code to be encoded
<DD><code>string</code> - Pro-Action Rocky code string to be filled</DD>
<DT><B>Returns: </B><DD>result code</DD>
</DL>

</DL>
<HR>

<A NAME="SetCode(constCode&)"><!-- --></A>
<A NAME="SetCode"><!-- --></A>
<H3>SetCode</H3>
<PRE>
public Result <B>SetCode</B>( const <a href="../api/Nes..Api..Cheats..Code.html">Nes::Api::Cheats::Code</a>& code ) throw();
</PRE>
<DL>
<DD>Adds a new code.
</DD>
<DL>
<DT><B>Parameters: </B><DD><code>code</code> - code, any existing code using the same address will be replaced</DD>
<DT><B>Returns: </B><DD>result code</DD>
</DL>

</DL>
<HR>

<TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0">
<TR>
<TD COLSPAN=2 BGCOLOR="#eeeeff">
<A NAME="navbar_top_firstrow"><!-- --></A>
<TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3">
  <TR ALIGN="center" VALIGN="top">
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="../../index-overview-summary.html"><B>Overview</B></a>&nbsp;</TD>
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="project-summary.html"><B>Project</B></a>&nbsp;</TD>
  <TD BGCOLOR="navy"> <FONT COLOR="white">&nbsp;<B>Class</B></FONT>&nbsp;</TD>
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="project-tree.html"><B>Tree</B></a>&nbsp;</TD>
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="../../index-deprecated-list.html"><B>Deprecated</B></a>&nbsp;</TD>
  <TD BGCOLOR="#eeeeff">    &nbsp;<a href="../../index-all.html"><B>Index</B></a>&nbsp;</TD>
  </TR>
</TABLE>
</TD>
<TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM>
<B>Nestopia Core API</B></EM>
</TD>
</TR>

<TR>
<TD><FONT SIZE="-2">
  <a href="../../index.html" target="_top"><B>FRAMES</B></a>  &nbsp;
&nbsp;<a href="../api/Nes..Api..Cheats.html" target="_top"><B>NO FRAMES</B></a></FONT></TD>
</TR>
<TR>
<TD VALIGN="top"><FONT SIZE="-2">
  SUMMARY: &nbsp;INNER&nbsp;|&nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_summary">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_summary">METHOD</A></FONT></TD>
<TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2">
DETAIL: &nbsp;FIELD&nbsp;|&nbsp;<A HREF="#constructor_detail">CONSTR</A>&nbsp;|&nbsp;<A HREF="#method_detail">METHOD</A></FONT></TD>
</TR>
</TABLE>
<!-- =========== END OF NAVBAR =========== -->

<HR>


</BODY>

</HTML>

